package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.antlr.v4.runtime.misc.NotNull;
import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.ExpressionContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.CaseWhenElseContext;

/**
 * case when else 部分语法遍历
 * @author zwd
 *
 */
public class CaseWhenElseVisitor extends AbsCQLParserBaseVisitor<CaseWhenElseContext>{

	private CaseWhenElseContext context = null;
	
	public CaseWhenElseVisitor() {
		context = new CaseWhenElseContext();
	}
	
	@Override
	protected CaseWhenElseContext defaultResult() {
		return context;
	}
	
	@Override
	public CaseWhenElseContext visitExpression(@NotNull ExpressionContext ctx) {
		ExpressionVisitor visitor = new ExpressionVisitor();
        context.setExpression(visitor.visit(ctx));
        return context;
	}

}
